import cv2
from model import VXSlim
from dataprocess import PreProcess, PostProcess

# 实例化模型，预处理和后处理
model = VXSlim("assets/mixVX_48x48_fer2013plus_32bs_43-0.83.hdf5")
prep = PreProcess()
postp = PostProcess()



# 图像读入及预处理
img_gray = cv2.imread('imgs/sad.jpeg',0)
inputs = prep(img_gray)

res = model(inputs)
# 后处理
label, conf = postp(res)

print(res)
print("表情：{}；置信度：{}".format(label, conf))


